package school.valon.persistence.pojo;

import java.io.Serializable;

import javax.persistence.*;

import java.util.Date;


/**
 * The persistent class for the survey_answer database table.
 * 
 */
@Entity
@Table(name="survey_answer")
@NamedQueries({
@NamedQuery(name="SurveyAnswer.findAll", query="SELECT s FROM SurveyAnswer s"),
@NamedQuery(name="SurveyAnswer.deleteById", query="DELETE FROM SurveyAnswer WHERE surveyAnswerId = :P1")
})
public class SurveyAnswer implements Serializable {

	private static final long serialVersionUID = -7869890942836659497L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="survey_answer_id")
	private Integer surveyAnswerId;

	@Column(name="survey_answer")
	private String surveyAnswer;

	@Temporal(TemporalType.DATE)
	@Column(name="survey_answer_date")
	private Date surveyAnswerDate;

	//bi-directional many-to-one association to SurveyQuestion
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="survey_question_id")
	private SurveyQuestion surveyQuestion;

	//bi-directional many-to-one association to User
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="user_id")
	private User user;

	public Integer getSurveyAnswerId() {
		return this.surveyAnswerId;
	}

	public void setSurveyAnswerId(Integer surveyAnswerId) {
		this.surveyAnswerId = surveyAnswerId;
	}

	public String getSurveyAnswer() {
		return this.surveyAnswer;
	}

	public void setSurveyAnswer(String surveyAnswer) {
		this.surveyAnswer = surveyAnswer;
	}

	public Date getSurveyAnswerDate() {
		return this.surveyAnswerDate;
	}

	public void setSurveyAnswerDate(Date surveyAnswerDate) {
		this.surveyAnswerDate = surveyAnswerDate;
	}

	public SurveyQuestion getSurveyQuestion() {
		return this.surveyQuestion;
	}

	public void setSurveyQuestion(SurveyQuestion surveyQuestion) {
		this.surveyQuestion = surveyQuestion;
	}

	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

}